pub struct Config {
    pub database_url: String,
    pub port: u16,
}

impl Config {
    pub fn init() -> Config {
        let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");
        let port = std::env::var("port").unwrap_or("8088".into());

        Config {
            database_url,
            port: port.parse().expect("Invalid port"),
        }
    }
}
